/**************************
* @Summary
* @Author 20009200303 赵传博
* @Date 6/15/2022
* @Note
*****************************/

#include "CPU.h"
#include <iostream>

CPU::CPU(CPU_Rank _rank, int _frequency, float _voltage) {
    rank = _rank;
    frequency = _frequency;
    voltage = _voltage;
    std::cout << "create a CPU!" << std::endl;
}

void CPU::showinfo() {
    std::cout << "rank: " << rank << std::endl;
    std::cout << "frequency: " << frequency << std::endl;
    std::cout << "voltage: " << voltage << std::endl;
}

CPU::CPU(const CPU &other) {
    rank = other.rank;
    frequency = other.frequency;
    voltage = other.voltage;
    std::cout << "copy create a CPU!" << std::endl;
}

CPU::~CPU() {
    std::cout << "destruct a CPU!" << std::endl;
}
